package com.southwind.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.southwind.entity.Student;
import com.southwind.servise.StudentService;

@RestController
@RequestMapping("/student")
public class StudentController {
@Autowired
StudentService service;
//通过id来查
@RequestMapping("/findById/{id}")
	public Student findById(@PathVariable("id") long id) {
		return service.findById(id);
	}
}
